#include "testelement.h"
#include "element.h"
#include "cassert"
#include <QDebug>
#include <iostream>


testElement::testElement()
{
}

void testElement:: teste1()
{
    element elemento;

    elemento.setNumeration(1);

    assert(elemento.getNumeration() == 1);


}

void testElement:: teste2()
{
     element elemento;
     QVector<node> n(4);

     n[0].setGlobalNumeration(1);
     n[1].setGlobalNumeration(2);
     n[2].setGlobalNumeration(5);
     n[3].setGlobalNumeration(4);


     elemento.setNodes(&n[0],&n[1],&n[2],&n[3]);

     assert(elemento.getNode(1)==&n[0] && elemento.getNode(2)==&n[1] && elemento.getNode(3)==&n[2] && elemento.getNode(4)==&n[3]) ;
}

void testElement:: teste3()
{
    element elemento;

    elemento.setLocalMatrix();
    mat x = elemento.getLocalMatrix();
    cout << x;
}

void testElement:: teste4()
{
    element elemento;
    for (int i = 0 ; i<2 ;i++)
    {
        for (int j = 0 ; j<2 ;j++)
        {
            for (int k = 0 ; k<2 ;k++)
            {
                for (int l = 0 ; l<2 ;l++)
                {
                    qDebug() << i << j << k << l;
                    qDebug() << elemento.getTensorCComponent(i,j,k,l);
                }
            }
        }
    }

}


